package com.youlai.boot.system.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.youlai.boot.common.annotation.DataPermission;
import com.youlai.boot.system.model.entity.Dept;
import com.youlai.boot.system.model.query.DeptQuery;
import com.youlai.boot.system.model.vo.DeptQueryVO;
import com.youlai.boot.system.model.vo.DeptVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface DeptMapper extends BaseMapper<Dept> {

    @DataPermission(deptIdColumnName = "id")
    @Override
    List<Dept> selectList(@Param(Constants.WRAPPER) Wrapper<Dept> queryWrapper);

    @DataPermission(deptIdColumnName = "id")
    List<Dept> getDeptList(@Param("queryParams") DeptQuery queryParams);

    /**
     *
     * @param
     * @return
     */
    @DataPermission(deptIdColumnName = "id")
    List<DeptQueryVO> getAllDeptList();
    /**
     *
     * @return
     */
    @DataPermission(deptIdColumnName = "id")
    List<Dept> listDeptOptions();

    Dept getDeptById(@Param("deptId") Long deptId);
}
